<?php
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines http://www.simplemachines.org
 * @copyright 2011 Simple Machines
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.0
 */

//if (!defined('SMF'))
//	die('Hacking attempt...');
	
class board_obj
{	
	public function collapse($id)
	{
		global $board1_db, $context;
		
		$sql = 'SELECT ignore_boards
		FROM {db_prefix}members
		WHERE id_member = ?;';
		
		$param = array(
			1 => $context['user']['id']
		);
		
		$id_string = $board1_db->getone($sql, $param);
		
		$id_array = explode(',', $id_string['ignore_boards']);
		
		return $id_array;
	}
}

function board_func()
{
	$boardFunc = new board_obj;
	
	!empty($_POST['perform']) ? $preform = $_POST['perform'] : $perform = null;
	!empty($_POST['id']) ? $id = $_POST['id'] : $id = null;
	
	switch ($perform)
	{
		case 'collapse':
			$boardFunc->collapse($_POST['id']);
			break;
	}
	
}
?>